Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a visual card editor for the weather forecast card, enabling users to configure the card through a UI instead of manually editing YAML. The implementation includes schema-based form rendering using Home Assistant's form helpers, with support for all card configuration options.
Key Changes:
- Added a new editor component (
weather-forecast-card-editor.ts) with comprehensive form schemas for all configuration options - Introduced
getConfigElement()andgetStubConfig()static methods to integrate the editor with Home Assistant's UI - Refactored configuration defaults into a reusable
DEFAULT_CONFIGconstant and added support for a newshow_forecastboolean option
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/weather-forecast-card.ts | Added editor integration methods, extracted configuration defaults to a constant, and implemented conditional rendering for the forecast section |
| src/types.ts | Extracted inline forecast and forecast_action types into named interfaces and added show_forecast boolean property |
| src/index.ts | Imported the new editor module to register it globally |
| src/editor/weather-forecast-card-editor.ts | New file implementing the complete visual editor with form schemas, localization, and config transformation logic |
| src/components/wfc-weather-condition-icon-provider.ts | Enhanced icons_path handling with trimming and trailing slash removal |
| package.json | Updated publicUrl path from weather-forecast-card to ha-weather-forecast-card |
Comments suppressed due to low confidence (1)
src/editor/weather-forecast-card-editor.ts:397
- This statement is unreachable.
return undefined;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ough to be handled in the card
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tero Roininen <troinine@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tero Roininen <troinine@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tero Roininen <troinine@users.noreply.github.com>
No description provided.